package com.cloud.Controller;

import com.cloud.feign.Service2Feign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: TongRui乀
 * @Date: 2019/10/15 17:02
 * @description：
 */
@RestController
public class WebController {


    @Autowired
    private Service2Feign service2Feign;


    @GetMapping("getService")
    public String getService(){
        return service2Feign.hello();
    }


    @GetMapping("service")
    public String hi(){
        return "i am service-01";
    }


    @GetMapping("timeout")
    public String timeout(){
        return this.service2Feign.timeout();
    }
}
